package ModelLayer;
import java.util.ArrayList;


public class DVD
{
    // instance variables - replace the example below with your own
    private int id;
    private String title;
    private String artist;
    private String publicationDate;
    private ArrayList<Copy> copylist;
    
   
    public DVD(int id,String title,String artist,String publicationDate)
    {
        this.id=id;
        this.title=title;
        this.artist=artist;
        this.publicationDate=publicationDate;
        copylist=new ArrayList<Copy>();
    }
    
    public int getNo()
    {return id;}
    public void addCopy(Copy newCopy)
    {copylist.add(newCopy);}
    public void copyBorrow(int serialNumber)
    {for (Copy c : copylist) {c.copyBorrow(serialNumber);}}
    public void copyReturn(int serialNumber)
    {for (Copy c : copylist) {c.returnBorrow(serialNumber);}}
}
